package hyl.base.net;

import java.nio.charset.Charset;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import hyl.core.MyCharset;
import hyl.core.run.IDo1;

public abstract class ASocket implements ISocket {
	Charset LocalCharSet = MyCharset._UTF8;
	protected static final Logger _log = LoggerFactory.getLogger("");
	protected IDo1<IpgReader> _IDo断开处理函数 = null;
	protected IDo1<IpgReader> _IDo接收处理函数 = null;
	String s用途;
	public abstract void close() ;
	public String getS用途() {
		return s用途;
	}

	public void setS用途(String s用途) {
		this.s用途 = s用途;
	}

	public IDo1<IpgReader> get_IDo接收处理函数() {
		return _IDo接收处理函数;
	}

	/**
	 * 接收函数千万不能阻塞或者死锁, 否则系统会崩溃
	 * @param IDo接收处理函数
	 */
	public void set_IDo接收处理函数(IDo1<IpgReader> IDo接收处理函数) {
		_IDo接收处理函数 = IDo接收处理函数;
	}
	public IDo1<IpgReader> get_IDo断开处理函数() {
		return _IDo断开处理函数;
	}
	public void set_IDo断开处理函数(IDo1<IpgReader> _IDo断开处理函数) {
		this._IDo断开处理函数 = _IDo断开处理函数;
	}
	

}
